home *** CD-ROM | disk | FTP | other *** search
- ; This swaps two com ports.
- ; BX=First com port.
- ; SI=Second Com Port.
-
- push es ; Save ES
- xor ax,ax ; Set the extra segment to
- mov es,ax ; zero (ROM BIOS)
- shl bx,1 ; Convert to word index
- shl si,1 ; Convert to word index
- mov ax,word ptr [bx + 03FEh]; Zero COM port address
- xchg word ptr [si + 03FEh],ax; Put first value in second,
- mov word ptr [bx + 03FEh],ax; and second value in first!
- pop es ; Restore ES
-
-